// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.randomizedWorld.randomizedDeadSurvivor;

import java.util.ArrayList;
import zombie.characterTextures.BloodBodyPartType;
import zombie.characters.IsoZombie;
import zombie.core.Rand;
import zombie.iso.BuildingDef;
import zombie.iso.IsoDirections;
import zombie.iso.RoomDef;
import zombie.iso.objects.IsoDeadBody;

public final class RDSHockeyPsycho extends RandomizedDeadSurvivorBase {
    public RDSHockeyPsycho() {
        this.name = "Hockey Psycho (friday 13th!)";
        this.setUnique(true);
        this.setChance(1);
    }

    @Override
    public void randomizeDeadSurvivor(BuildingDef def) {
        RoomDef roomDef = this.getLivingRoomOrKitchen(def);
        ArrayList arrayList = this.addZombies(def, 1, "HockeyPsycho", Integer.valueOf(0), roomDef);
        if (arrayList != null && !arrayList.isEmpty()) {
            IsoZombie isoZombie = (IsoZombie)arrayList.get(0);
            isoZombie.addBlood(BloodBodyPartType.Head, true, true, true);

            for (int int0 = 0; int0 < 10; int0++) {
                isoZombie.addBlood(null, true, false, true);
                isoZombie.addDirt(null, Integer.valueOf(Rand.Next(0, 3)), true);
            }
        }

        for (int int1 = 0; int1 < 10; int1++) {
            IsoDeadBody isoDeadBody = createRandomDeadBody(this.getRandomRoom(def, 2), Rand.Next(5, 20));
            if (isoDeadBody != null) {
                this.addTraitOfBlood(IsoDirections.getRandom(), 15, (int)isoDeadBody.x, (int)isoDeadBody.y, (int)isoDeadBody.z);
                this.addTraitOfBlood(IsoDirections.getRandom(), 15, (int)isoDeadBody.x, (int)isoDeadBody.y, (int)isoDeadBody.z);
                this.addTraitOfBlood(IsoDirections.getRandom(), 15, (int)isoDeadBody.x, (int)isoDeadBody.y, (int)isoDeadBody.z);
            }
        }

        def.bAlarmed = false;
    }
}
